


import json
import time

import redis
import re
from django.http import JsonResponse,HttpResponse

# r.set())
# print(r.get('we')))
pool=redis.ConnectionPool(host='127.0.0.1',port=6379,decode_responses=True)
r=redis.Redis(connection_pool=pool)

# r.lpush('ob',1)
# r.lpush('ob',2)
# r.lpush('ob',3)
# r.lpush('ob',4)
# r.lpush('ob',5)
# # ret=r.lrange('ob',0,3)
# while True:
#     info=r.brpop("ob")
#     if not info:
#         break
#
#     print(info)
#     time.sleep(5)

# da={'sd':1,"s":2}
# print((da).count)


# r.hset('as',"name","hhh")
# r.hset('as',"type","hx")
# r.hset('as',"sql","redis")
# r.hset('as',"sd",234234)
# hx=r.hgetall('as')
# print(hx)

# r.sadd('s',2)
# r.sadd('s',3)
# r.sadd('s',4)
# r.sadd('s',5)
# # sd=r.smembers('s')
# # print(sd)
#
# while True:
#     sd=r.spop("s")
#     if not sd:
#         break
#     time.sleep(5)
#     print(sd)

# r.zadd('w',1)






